/*
 * @Author: 陈德基
 * @Date: 2021-09-27 11:32:52
 * @LastEditTime: 2021-11-16 21:47:48
 * @Description: 
 * @FilePath: \copy_gsy_github_app_flutter\lib\common\vm\base_load_data_behavior.dart
 * 联系方式：
 * wx: melody_2009
 * qq: 7815171323 
 */

import 'package:flutter/foundation.dart';

import 'i_loading_behavior.dart';

abstract class BaseDataLoadingBehavior<Parames, Result>
    implements ILoadingBehavior {
  @protected
  ILoadingBehavior? wrap;

  @protected
  Parames? parames;

  set param(Parames parames) => this.parames = parames;

  BaseDataLoadingBehavior({this.wrap});

  Future<Result> request();

  @override
  void loading() {
    this.wrap?.loading();
  }

  @override
  void finishLoad() {
    this.wrap?.finishLoad();
  }
}
